﻿using System;
using System.ComponentModel;
using Edge.Business.Stat;

namespace Edge.Business.Entities
{
    [Serializable]
    public class EntityWithStat<TID> : BaseEntity<TID>, IStat<UserEntity<TID>>
    {
        protected DateTime _createdate = DateTime.Now;
        protected DateTime _modifydate = DateTime.Now;
        protected UserEntity<TID> _createdBy;
        protected UserEntity<TID> _modifiedBy;

        public virtual DateTime CreateDate
        {
            get { return _createdate; }
            set { _createdate = value; }
        }

        public virtual DateTime ModifyDate
        {
            get { return _modifydate; }
            set { _modifydate = value; }
        }

        public virtual UserEntity<TID> CreatedBy
        {
            get { return _createdBy; }
            set { _createdBy = value; }
        }

        public virtual UserEntity<TID> ModifiedBy
        {
            get { return _modifiedBy; }
            set { _modifiedBy = value; }
        }

    }

    public enum ChangeType
    {
        [Description("Добавил")]
        Add = 1,
        [Description("Изменил")]
        Edit = 2,
        [Description("Удалил")]
        Delete = 6,

    }
}